<%@ page language="java" pageEncoding="UTF-8" %>
    <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
        <%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn" %>
            <% String path=request.getContextPath(); String basePath=request.getScheme() + "://" +
                request.getServerName() + ":" + request.getServerPort() + path + "/" ; %>

                <!DOCTYPE html>
                <html>

                <head>

                    <meta charset="utf-8">
                    <meta http-equiv="X-UA-Compatible" content="IE=edge">
                    <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
                    <meta name="description" content="">
                    <%-- <base href="<%=basePath%>"> --%>
                        <title>备品配件验收指令单</title>
                        <link rel="stylesheet" href="<%=basePath%>resourse/weui/lib/weui.min.css">
                        <link rel="stylesheet" href="<%=basePath%>resourse/weui/css/jquery-weui.min.css">
                        <script src="<%=basePath%>resourse/weui/lib/jquery-2.1.4.js"></script>
                        <script src="<%=basePath%>resourse/weui/js/jquery-weui.min.js"></script>
                </head>
                <script>
                    $(function () {
                        $("#tab1loadmore").hide();
                    })
                </script>

                <body ontouchstart>
                    <div class="weui-search-bar" id="searchBar">
                        <form class="weui-search-bar__form" id="form" action="/XYOfficePlatForm/wx/qm/index">
                            <div class="weui-search-bar__box">
                                <i class="weui-icon-search"></i>
                                <input type="search" name="search" class="weui-search-bar__input" id="searchInput"
                                    placeholder="" required="">
                                <input type="hidden" id="userid" name="userid" value="${userid}" />
                                <a href="javascript:" class="weui-icon-clear" id="searchClear"></a>
                            </div>
                            <label class="weui-search-bar__label" id="searchText">
                                <span>输入检验批编号、物料名称、物料编码、供应商名称查询</span>
                                <%-- <i class="weui-icon-search"></i>--%>

                            </label>
                        </form>
                        <a href="javascript:" class="weui-search-bar__cancel-btn" id="search"
                            onclick="searchParts()">搜索</a>
                        <a href="javascript:" class="weui-search-bar__cancel-btn" id="searchCancel">取消</a>
                    </div>
                    <div class="weui-tab">
                        <div class="weui-navbar">
                            <a class="weui-navbar__item weui-bar__item--on" href="#tab1"> 待处理</a>
                            <a class="weui-navbar__item" href="#tab2"> 已处理 </a>
                            <a class="weui-navbar__item" href="#tab3"> 抄送我 </a>
                        </div>
                        <div class="weui-tab__bd">
                            <div id="tab1" class="weui-tab__bd-item weui-tab__bd-item--active">
                                <div class="weui-flex">
                                    <div class="weui-flex__item" id="listwrap">
                                        <%-- 列表 --%>
                                            <div class="weui-cells" style="margin-top: auto">
                                                <c:forEach items="${list0}" var="item">
                                                    <c:if test="${item.status=='0' }">
                                                        <a class="weui-cell weui-cell_access"
                                                            href="<%=basePath%>/qm/queryProcess?parId=${item.parId}">
                                                            <%-- <a class="weui-cell weui-cell_access"
                                                                href="qm/partItems?parId=${item.parId}">--%>
                                                                <div class="weui-cell__bd">
                                                                    <p>${item.parCheckCode} ${item.mmDetail}</p>
                                                                    <p>${item.parFactory} ${item.parSupplyName}</p>
                                                                </div>
                                                                <div class="weui-cell__ft">${item.parCode}</div>
                                                        </a>
                                                    </c:if>
                                                </c:forEach>
                                            </div>
                                            <div id="tab1loadmore" class="weui-loadmore"
                                                style="padding-bottom:30px;height:20px">
                                                <i class="weui-loading"></i>
                                                <span class="weui-loadmore__tips">正在加载</span>
                                            </div>
                                    </div>
                                </div>

                            </div>
                            <div id="tab2" class="weui-tab__bd-item">
                                <div class="weui-flex">
                                    <div class="weui-flex__item">
                                        <%-- 列表 --%>
                                            <div class="weui-cells" style="margin-top: auto">
                                                <c:forEach items="${list1}" var="item">
                                                    <c:if test="${item.status=='1' }">
                                                        <a class="weui-cell weui-cell_access"
                                                            href="<%=basePath%>/qm/queryProcess?parId=${item.parId}">
                                                            <%-- <a class="weui-cell weui-cell_access"
                                                                href="qm/partItems?parId=${item.parId}">--%>
                                                                <div class="weui-cell__bd">
                                                                    <p>${item.parCheckCode} ${item.mmDetail}</p>
                                                                    <p>${item.parFactory} ${item.parSupplyName}</p>
                                                                </div>
                                                                <div class="weui-cell__ft">${item.parCode}</div>
                                                        </a>
                                                    </c:if>
                                                </c:forEach>
                                            </div>
                                    </div>
                                </div>

                            </div>
                            <div id="tab3" class="weui-tab__bd-item">
                                <h1>暂无内容</h1>
                            </div>
                        </div>
                    </div>

                    <script src="<%=basePath%>resourse/weui/lib/jquery-2.1.4.js"></script>
                    <script src="<%=basePath%>resourse/weui/js/jquery-weui.min.js"></script>
                    <!-- 如果使用了某些拓展插件还需要额外的JS -->
                    <script src="<%=basePath%>resourse/weui/js/swiper.min.js"></script>
                    <script src="<%=basePath%>resourse/weui/js/city-picker.min.js"></script>
                    <script src="<%=basePath%>resourse/weui/lib/fastclick.js"></script>
                    <script>

                        function searchParts() {
                            $('#form').submit();

                        }

                        var pageObj = {}; //定义全局对象
                        pageObj.page = 1;   //页码
                        pageObj.pageSize = 10; //每页显示条数
                        var loading = false;  //状态标记
                        $("#listwrap").infinite().on("infinite", function () {
                            if (loading) return;
                            loading = true;
                            page++; //页数
                            $('#tab1loadmore').show();
                            setTimeout(function () {
                                // loadlist();
                                loading = false;
                            }, 2500);   //模拟延迟
                        })

                    </script>

                </body>

                </html>